#!/usr/bin/env python
#-*- coding:utf-8 -*- 

#激活码特征：非重复随机序列号

import random

def random_str(randomlength=16):
    """
    生成一个指定长度的随机字符串
    """
    random_str = ''
    base_str = 'ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz'
    length = len(base_str) - 1
    for i in range(randomlength):
        random_str += base_str[random.randint(0, length)]
    return random_str

l = []
l.append(random_str())
for i in range(199):
	true = 0
	while true == 0:	#判断重复特征码
		true = 1
		new = random_str()
		for j in l:
			if j == new:
				true = 0
		if true == 1:
			l.append(new)

print(l)